/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.pconline.autoclub.entity;

import cn.pconline.autoclub.util.AppUtils;
import org.gelivable.dao.Column;
import org.gelivable.dao.Entity;
import org.gelivable.dao.Id;

/**
 *
 * @author xulin
 */
@Entity(tableName="ac_subject_photo")
public class SubjectPhoto {
    /**
     * 是否封面
     */
    public static final int IS_COVER = 1;
    /**
     * 图片ID
     */
    @Id
    @Column(name="photo_id")
    private long photoId;
    /*
     * 话题ID
     */
    @Column(name="subject_id")
    private long subjectId;
    /**
     * 图片URL
     */
    @Column(name="url")
    private String url;
    /**
     * 序号
     */
    @Column(name="seq")
    private int seq;

    public long getPhotoId() {
        return photoId;
    }

    public void setPhotoId(long photoId) {
        this.photoId = photoId;
    }
    
    public long getSubjectId() {
        return subjectId;
    }

    public String getUrl() {
        return url;
    }

    public int getSeq() {
        return seq;
    }

    public void setSubjectId(long subjectId) {
        this.subjectId = subjectId;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public void setSeq(int seq) {
        this.seq = seq;
    }
    public String getUrl134x134(){
        return AppUtils.converImg(url, "1024x1024", "134x134");
    }
    public String getUrl400x400(){
        return AppUtils.converImg(url, "1024x1024", "400x400");
    }
}
